package com.naml.demo;

/**
 * @author marin
 * @version 1.0
 * @date 2025/4/16 21:51
 */
public class Enumeration01 {

    public static void main(String[] args) {
        Season spring = new Season("春天", "温暖");
        Season winter = new Season("冬天", "寒冷");
        Season summer = new Season("夏天", "炎热");
        Season autumn = new Season("秋天", "凉爽");
        Season autumn2 = new Season("秋天2", "凉爽2");
        autumn.setName("秋天不良书");
        /*
        * 通过这个案例可以发现：
        *   1、明明就想要四个季节，实际上却可以多个。
        *   2、只需读即可，不需要修改。
        */
    }
}

class Season {
    private String name;
    private String desc;

    public Season(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }
}